﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class ItemScript : MonoBehaviour,IDragHandler,IBeginDragHandler,IEndDragHandler
{
    private Transform _previousParent;

    public void OnBeginDrag(PointerEventData eventData)
    {
        _previousParent = transform.parent;
    }

    public void OnDrag(PointerEventData eventData)
    {
        transform.position += new Vector3(eventData.delta.x, eventData.delta.y, 0);
    }


    public void OnEndDrag(PointerEventData eventData)
    {
        Debug.Log("OnEndDrag");
    }
}
